{% extends "base.html" %}

{% block title %}
<title>我的收藏</title>
{% endblock %}
{% block css %}
<style>

    .myfooter{
        position: relative;
        top: 350px;
    }
</style>
{% endblock %}

{% block body %}
{% include 'header.html' %}

<h1>我的收藏</h1>

<div class="row col-md-6 col-md-offset-3">


    {% for e in page %}
    <div class="panel panel-default">
        <div class="panel-heading">
            <a href="{% url 'main:course_details' e.course.id %}"> {{ e.course.title }}</a>&nbsp&nbsp&nbsp
            <span>作者：{{ e.course.author }}</span>
            <div>
                {% for t in e.course.tag.all %}
                <span class="label  mytag ">{{ t.title }}</span>
                {% endfor %}
            </div>
        </div>
    </div>
    {% endfor %}
    <div class="fen_page">
        <nav aria-label="Page navigation">
            <ul class="pagination">
                {% if page.has_previous %}
                <li>
                    <a href="?page={{ page.previous_page_number }}" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
                {% endif %}


                {% for i in page.paginator.get_elided_page_range%}
                {% if page.number == i %}
                <li class="active"><a href="?page={{ i }}">{{ i }}</a></li>
                {% else %}
                <li><a href="?page={{ i }}">{{ i }}</a></li>
                {% endif %}
                {% endfor %}


                {% if page.has_next %}
                <li>
                    <a href="?page={{ page.next_page_number }}" aria-label="Next">
                        <span aria-hidden="true">&raquo;</span>
                    </a>
                </li>
                {% endif %}


            </ul>
        </nav>
    </div>
       </div>
{% include 'footer.html' %}

{% endblock %}
